package com.app.ria
{
    import mx.core.UIComponent;

    public class MathRec extends UIComponent
    {
        private var _color:uint = 0x000000;
        private var _length:int = 10;
        private var _height:int = 20;

        public function MathRec()
        {
            super();
            DrawRectangle();
        }

        public function DrawRectangle():void
        {
            this.graphics.clear();
            this.graphics.lineStyle(1, _color);
            this.graphics.drawRect(120, 120, _length, _height);
        }

        public function getArea():int
        {
            return (this._length * this._height);
        }

        public function getPerim():int
        {
            return ((2 * (this._height)) + (2 * (this._length)));
        }


        public function set color(value:uint):void
        {
            this._color = value;
        }

        public function set Reclength(value:int):void
        {
            this._length = value;
        }

        public function set Recheight(value:int):void
        {
            this._height = value;
        }

        public function get color():uint
        {
            return this._color;
        }

        public function get Reclength():int
        {
            return this._length;
        }

        public function get Recheight():int
        {
            return this._height;
        }


    }
}